package com.zxcz.controller.config;

import java.io.File;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.zxcz.tools.Constants;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer{

	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		
		String path = System.getProperty("user.dir");
		
        registry.addResourceHandler("/" + Constants.FOLDER + "/**")
        	.addResourceLocations("file:" + path + File.separator + Constants.FOLDER + File.separator);
	}
	
}
